<script setup>
import { RouterView } from 'vue-router'
import HeadNav from './components/HeadNav.vue'
import NavLeft from "./components/NavLeft.vue";
import { computed } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const isLoginPage = computed(() => {
      return route.path === '/login'; // 根据你的登录页面路径进行调整
    });
</script>

<template>


 
  <div class="main">
    <Head-nav></Head-nav>
    <div class="main-content">
      <div class="main-left" v-if="!isLoginPage">
        <Nav-left ></Nav-left>
      </div>
      <div class="main-right">
        <RouterView></RouterView>
      </div>
    </div>
  </div>

</template>

<style scoped lang="scss">
body{
  margin: 0;
  padding: 0;
}
#app{
  padding: 0px;
  width: 100%;
}
.main{
  width: 100%;
  height: 100vh;
  background-color: #f2f2f2;
  display: flex;
  flex-direction: column;
}
.main-content{
  display: flex;
  flex: 1;
}
.main-left{
  width: 30%;
  max-width: 200px
}
.main-right{
  flex: 1;
}

</style>
